package com.zn.kjj.controller;

import com.zn.kjj.entity.KjjBasicInfo;
import com.zn.kjj.service.KJJBasicInfoable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author Administrator
 */
@Controller()
public class EnterPriseUserController {
    @Autowired
    @Qualifier("kjjBasicInfoImpl")
    private KJJBasicInfoable kjjBasicInfoImpl;
    @RequestMapping("/toBasicIndex")
    public String toBasicIndex(HttpServletRequest request) {
        List<KjjBasicInfo> basiclist = kjjBasicInfoImpl.selectAll();
        request.setAttribute("ulist", basiclist);
        return "/enterprise/enterprise_index";
    }
    /**
    @RequestMapping("/toUserView{strGuid}")
    public String toUserView(@PathVariable String strGuid, HttpServletRequest request) {
        System.out.println(strGuid);
        SysLoginXtyh sysLoginXtyh = kjjBasicInfoImpl.selectByPrimaryKey(strGuid);
        request.setAttribute("user", sysLoginXtyh);
        return "/user/user_view";
    }
    @RequestMapping("/toUserUpdate")
    public String toUserUpdate(SysLoginXtyh sysLoginXtyh) {
        System.out.println(sysLoginXtyh.getFztjgzrycz());
        System.out.println("toUserUpdate");
        kjjBasicInfoImpl.updateByPrimaryKey(sysLoginXtyh);
        return "redirect:/toUserIndex";
    }
    */
}
